package com.cch.cooperation.dao.auth.model;

import java.util.Date;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 
 *
 * @author cch on 2024-09-17
 */
@ApiModel("用户信息")
@Data
public class User implements Serializable {

    @ApiModelProperty("id")
    private String id;

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("苹果用户ID")
    private String appleUserId;

    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("性别（0.男 1.女）")
    private Integer sex;

    @ApiModelProperty("用户类型（0.游客 1.正常用户）")
    private Integer type;

    @ApiModelProperty("头像地址")
    private String avatarUrl;

    @ApiModelProperty("账号状态(0.注销 1.正常)")
    private Integer status;

    @ApiModelProperty("会员到期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date vipExpireTime;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty("是否是新创建的用户")
    @TableField(exist = false)
    private Boolean isNewCreate;

    public static final String ID = "id";
    public static final String USERNAME = "username";
    public static final String NICKNAME = "nickname";
    public static final String AVATAR_URL = "avatar_url";
    public static final String CREATE_TIME = "create_time";
    public static final String UPDATE_TIME = "update_time";

}